<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>检验报告详情</title>
    <%- include('../_global/baseLibsJKDA') %>
        <link rel="stylesheet" href="/static/css/public.css" />
        <link rel="stylesheet" href="/static/css/page-main.css" />
        <style>
            html,
            body {
                background-color: #fff;
            }

            .doctor-header {
                padding: 0 15px;
                line-height: 1.1rem;
                background-color: white;
                border-bottom: 1px solid #d9d9d9;
            }

            .doctor-header h3 {
                font-size: 1.4rem;
                color: #333;
            }

            .doctor-header p {
                font-size: .92rem;
                color: #909090;
                padding-bottom: 10px;
            }

            .doctor-detail {
                background-color: white;
                padding: 10px 15px;
                color: #101010;
                font-size: .92rem;
                line-height: .92rem;
                border-bottom: 1px solid #d9d9d9;
            }

            .doctor-detail div {
                height: 2rem;
                line-height: 2rem;
            }

            .report-table {
                margin: .5rem auto;
                background-color: #fff;
                text-align: center;
            }

            .report-table table {
                background-color: #f6fbfc;
    border: 1px solid #64b2e1;
    width: 90%;
    margin: 15px;
            }

            .report-table tr th {
                color: #2359ab;
                height: 3.37rem;
            }

            .report-table tr td {
                height: 4.5rem;
            }

            .left {
                color: #969696;
                font-size: 1rem;
            }

            .checkName {
                color: #666;
                font-size: 1rem;
            }
        </style>
</head>

<body>
    <header class="header-box grey fixed">
        <div class="header-content">
            <div class="left-tool">
                <a class="back" href="javascript:void(0);">
                    <i class="iconfont icon-back"></i>
                </a>
            </div>
            <div class="title">检验报告详情</div>
        </div>
    </header>
    <div class="doctor-header">
        <h3 class="hosName">

        </h3>
        <p>
            <span class="left">就诊时间: </span>
            <span class="checkName reportDate"></span>

        </p>
    </div>
    <div class="doctor-detail-box">

    </div>
</body>
<script src="/static/js/gzd/pageUrl.js"></script>
<script src="/static/js/gzd/jkda.js"></script>
<script>
    var page_jybg = (function ($, page_jybg) {


        var hosName = $.QuickUrlUtils.getRequest("hosName");
        var reportDate = $.QuickUrlUtils.getRequest("reportDate");
        var zxwyh = $.QuickUrlUtils.getRequest("zxwyh");
        var jcbgData = StoreCache.getCache("jybgData");
        var jcbg = JSON.parse(jcbgData);
        var cfg_def = {
            jybgDetail: jybgDetail,
        }


        page_jybg.init = function (cfg) {
            $.extend(page_jybg, cfg_def, cfg);
            $(".hosName").text(hosName);
            $(".reportDate").text(reportDate);

            $.QuickRemote.AjaxJson({
                funcName: "/api/gzd/jkda/queryJybgxq",
                callback: page_jybg.jybgDetail,
                params: {
                    surveyingType: "1", //1门诊 2住院
                    zxwyh: zxwyh, //中心唯一号
                    reportId: jcbg.reportId, //报告id
                    medicalOrgId: jcbg.hosCode, //医疗机构代码
                    cardId: "", //检查号
                    serialNum: jcbg.jzlsh, //就诊流水号
                    cardDate: reportDate, //报告日期
                    cardType: jcbg.cardType, //卡类型(0-社保卡；1-医保卡；2-自费卡)
                    userCardNo: jcbg.userCardNo, //卡号

                    // surveyingType: "1", //1门诊 2住院
                    // zxwyh: "310225193908163614", //中心唯一号
                    // reportId: "311001", //报告id
                    // medicalOrgId: "42490771402", //医疗机构代码
                    // cardId: "", //检查号
                    // serialNum: "", //就诊流水号
                    // cardDate: "20180411", //报告日期
                    // cardType: "0", //卡类型(0-社保卡；1-医保卡；2-自费卡)
                    // userCardNo: "S07038822", //卡号


                },
                header: true
            });
        }


        function jybgDetail(response) {
            $(".doctor-detail-box").html(template("jcbgList", {
                data: response
            }));
        }
        return page_jybg;
    })(jQuery, {});
</script>
<script type="text/html" id="jcbgList">
    {{each data}}
    <div class="doctor-detail">
        <div>
            <span class="left">检查项目:</span>
            <span class="checkName">{{$value.checkName}}</span>
        </div>
        <div>
            <span class="left">标本名称:</span>
            <span class="hosName">{{$value.specimenName}}</span>
        </div>
        <div>
            <span class="left">报告医生:</span>
            <span class="hosName">{{$value.docName}}</span>
        </div>
        <!-- <div>
                    <span class="left">报告日期：</span>
                    <span class="reportDate">{{$value.reportDate}}</span>
                </div> -->
        <div>
            <span class="left">报告单号:</span>
            <span class="reportId">{{$value.reportId}}</span>
        </div>
    </div>
    <div class="report-table">
        <table border="1">
            <tr>
                <th>项目</th>
                <th>结果</th>
                <th>参考值</th>
                <th>异常提示</th>
            </tr>
            {{each $value.items}}
            <tr>
                <td>{{$value.itemName}}</td>
                <td>{{$value.resultValue}}</td>
                <td>{{$value.referenceValue}}</td>
                <td>{{$value.abnormalNotice}}</td>
            </tr>
            {{/each}}

        </table>
    </div>


    {{/each}}
</script>

</html>